/*
 * handleInput.cpp
 *
 *  Created on: 1 avr. 2009
 *      Author: CHETIER
 */

#include "SnowApplication.h"

int SnowApplication::handleInput()
{
	while (SDL_PollEvent(&_event))
	{
		switch (_event.type)
		{
		case SDL_QUIT:
			return 1;

		case SDL_KEYDOWN:
			if (_event.key.keysym.sym == SDLK_UP)
			{

			}
			else if (_event.key.keysym.sym == SDLK_DOWN)
			{

			}
			else if (_event.key.keysym.sym == SDLK_RIGHT)
			{

			}
			else if (_event.key.keysym.sym == SDLK_LEFT)
			{

			}
			break;

		case SDL_KEYUP:
			if (_event.key.keysym.sym == SDLK_q)
			{
				_appExit = 1;
			}
			else if (_event.key.keysym.sym == SDLK_UP)
			{

			}
			else if (_event.key.keysym.sym == SDLK_DOWN)
			{

			}
			else if (_event.key.keysym.sym == SDLK_RIGHT)
			{

			}
			else if (_event.key.keysym.sym == SDLK_LEFT)
			{

			}
			break;

		default:
			break;
		}
	}

	return EXIT_SUCCESS;
}
